package com.campuscarbooking.api.dto.auth;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class PhoneLoginRequest {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    private String password;

    private String code;

    @NotBlank(message = "登录类型不能为空")
    @Pattern(regexp = "password|code", message = "登录类型必须是password或code")
    private String loginType;

    @NotBlank(message = "用户类型不能为空")
    @Pattern(regexp = "student|teacher", message = "用户类型必须是student或teacher")
    private String userType;
} 